That kept Real top of LaLiga on 50 points, one ahead of Atletico in second who missed a chance to leapfrog them. Barcelona, third on 45 points, visit Sevilla on Sunday with a chance to close the gap in the title race.
The result means Real, on 49 points, are one point clear of Atletico Madrid, who beat Mallorca 2-0, ahead of next weekend's Spanish capital derby at Santiago Bernabeu.
IMAGES from the UEFA Champions League matches played on Wednesday
Barcelona moved to the brink of retaining the LaLiga title after Robert Lewandowski and Ferran Torres struck late in a 2-1 victory at Osasuna.
Jude Bellingham converted a penalty and Kylian Mbappe added another goal before halftime to spur Real Madrid to a 2-0 victory over Getafe.
His contract was due to expire in 2024, and this extension ends speculation that Ancelotti would take over as manager of Brazil.
IMAGES from football matches played across Europe on Wednesday.
Real Madrid manager Carlo Ancelotti said that he understands the club fans booying him and his team in their 5-2 win over Celta Vigo.
A round-up of Wednesday's Champions League quarter-final second leg between Real Madrid and Arsenal, Inter Milan and Bayern Munich.
A summary of Tuesday's Champions League first leg quarter-finals between Arsenal and Real Madrid, and Inter Milan and Bayern Munich.
LaLiga leaders Real Madrid's pursuit of a record-extending 36th Spanish title
Real Madrid forward Rodrygo will miss the rest of the season and the World Cup after tearing his ACL and outer meniscus in a LaLiga defeat against Getafe, the club confirmed.
Real Madrid got their LaLiga title defence off to a limp start as they were held to a 1-1 draw at Mallorca.
West Bengal Chief Minister Mamata Banerjee visited the Santiago Bernabeu stadium in Madrid along with La Liga President Javier Tebas.
Lille coach Genesio hails perfect night after win over Real
Kylian Mbappe was in inspired form, scoring twice to guide Real Madrid to a comeback 4-1 win over visitors Las Palmas on Sunday.
Norwegian debutants Bodo/Glimt shocked Atletico Madrid 2-1 away in the Champions League, staging a comeback to secure a historic place in the knockout stage.
After a long night of celebrations, the team arrived in Madrid early on Sunday and started the party tour at 6 p.m. local time
Xabi Alonso guided Bayer Leverkusen to a double last season as they won the German Cup and lifted their first Bundesliga title without losing a game.
A round-up of the UEFA Champions League last-16 first leg matches played on Tuesday.
A tenacious Barcelona frustrated Real Madrid to secure a 1-0 win over their bitter rivals in an ill-tempered Copa del Rey semi-final first leg on Thursday.
A round-up of Saturday's action in LaLiga, Ligue 1 and Serie A
On Thursday, Vinicius called on UEFA, Europe's soccer governing body, to punish Atletico for alleged racist chanting ahead of their team's Champions League match against Inter Milan on Wednesday.
Read Madrid midfielder Jude Bellingham has been suspended for two games by La Liga for showing contempt towards the referee having received a red card after the final whistle in their 2-2 draw with Valencia on Saturday.
Nico O'Reilly's opportunistic strike and Erling Haaland's penalty helped Manchester City to fight back to beat Real Madrid 2-1 in a tense Champions League contest at the Santiago Bernabeu on Wednesday.
Real Madrid had courted Mbappe in the past but failed to land the player, who signed a contract extension with PSG in May 2022 when the Spanish club had a bid rejected.
A round-up of Saturday's action in LaLiga, Ligue 1, Serie A and Bundesliga.
France captain Kylian Mbappe has agreed to join Real Madrid on a five-year deal.
Zinedine Zidane is expected to take over as France's head coach after the 2026 FIFA World Cup, following the departure of Didier Deschamps after 14 years in charge.
Real Madrid paid for defensive mistakes as they were held to a 3-3 draw at lowly local rivals Rayo Vallecano on Saturday.
Pep Guardiola remains optimistic about Manchester City's future despite their Champions League elimination by Real Madrid, highlighting the team's spirit and the importance of experience for new players.
Real Madrid said their participation in the tournament was never in question.
Indian club East Bengal produced an utterly dominant show to crush Bangladesh's Bashundhara Kings 4-0 in their AFC Challenge League match in Thimphu on Tuesday.
Liverpool were drawn on Thursday to face champions Real Madrid when they return to the Champions League, which has been expanded to a 36-team league format.
The 64-year-old has been at Real Madrid since 2021, having previously managed the club from 2013 to 2015.
Ronaldo, who was top scorer in Serie A last season, has 12 months remaining on his contract at Juventus but has expressed no desire to leave.
Ancelotti's second-string players proved they were up to the task as they secured three points for Real and kept them on course for the inevitable LaLiga title celebrations.
'From the Academy right through until now, the support and love I have felt from everyone inside and outside of the club will stay with me forever. I will forever be in debt to you all.'
Real Madrid coach Carlo Ancelotti is looking for a big improvement from his side when they play their first home game of the LaLiga season, against Valladolid on Sunday, with Kylian Mbappe making his Santiago Bernabeu debut
This sets up Real Madrid final against Borussia Dortmund, who knocked out Paris Saint-Germain in the other semi-final.